home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 7
/
Apprentice-Release7.iso
/
Source Code
/
Pascal
/
Snippets
/
PNL Libraries
/
Libraries
/
SpriteWorld
/
SpriteWorld files
/
Headers
/
BlitPixie.h
next >
Wrap
Text File
|
1996-10-29
|
6KB
|
255 lines
///--------------------------------------------------------------------------------------
// BlitPixie.h
//
// Description: This is the include file for all the BlitPixie source files.
///--------------------------------------------------------------------------------------
#ifndef __BLITPIXIE__
#define __BLITPIXIE__
#ifndef __SWCOMMON__
#include "SWCommonHeaders.h"
#endif
#ifndef __QUICKDRAW__
#include <QuickDraw.h>
#endif
#ifndef __SPRITEFRAME__
#include "SpriteFrame.h"
#endif
#ifndef __SPRITE__
#include "Sprite.h"
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
///--------------------------------------------------------------------------------------
// type definitions & conditional macros
///--------------------------------------------------------------------------------------
#if SW_PPC
#define SW_USE_C 1
#endif
/*
typedef double PixelChunk, *PixelChunkPtr, **PixelChunkHdl;
#define BytesToChunks(b) ((b) >> 3)
#define ChunksToBytes(b) ((b) << 3)
#else // SW_PPC
*/
typedef unsigned long PixelChunk, *PixelChunkPtr, **PixelChunkHdl;
#define BytesToChunks(b) ((b) >> 2)
#define ChunksToBytes(b) ((b) << 2)
//#endif // SW_PPC
typedef unsigned long* PixelPtr;
typedef struct StarArray
{
short horizLoc; // Current horizontal position of the star
short vertLoc; // Current vertical position of the star
short oldHorizLoc; // Horizontal position of star the previous frame
short oldVertLoc; // Vertical position of star the previous frame
short horizSpeed; // To be used by the user to move the star
short vertSpeed; // To be used by the user to move the star
short color; // Current color of the star
Boolean needsToBeErased; // If drawn last frame, then it needs to be erased.
short userData; // Reserved for user
} StarArray;
///--------------------------------------------------------------------------------------
// Function prototypes for all-bit blitters
///--------------------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
SW_FUNC void BlitPixieAllBitRectDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect *srcRect,
Rect *dstRect);
SW_FUNC void BPAllBitInterlacedRectDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect* srcRect,
Rect* dstRect);
SW_FUNC void BlitPixieAllBitMaskDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect *srcRect,
Rect *dstRect);
SW_FUNC void BlitPixieAllBitPartialMaskDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect *srcRect,
Rect *dstRect);
SW_FUNC void BPAllBitInterlacedMaskDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect* srcRect,
Rect* dstRect);
SW_FUNC void BPAllBitInterlacedPartialMaskDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect* srcRect,
Rect* dstRect);
SW_ASM_FUNC void BlitPixieAllBit(
register PixelPtr srcPixelP,
register PixelPtr dstPixelP,
unsigned long rowsToCopy,
unsigned long numBytesPerRow,
register unsigned long srcRowStride,
register unsigned long dstRowStride,
register unsigned long srcExtraStart,
register unsigned long dstExtraStart,
register unsigned long dstExtraEnd);
SW_ASM_FUNC void BlitPixieAllBitMask(
register PixelPtr srcPixelP,
register PixelPtr dstPixelP,
register PixelPtr maskPixelP,
unsigned long rowsToCopy,
unsigned long numBytesPerRow,
register unsigned long srcRowStride,
register unsigned long dstRowStride,
register unsigned long srcExtraStart,
register unsigned long dstExtraStart,
register unsigned long dstExtraEnd);
SW_ASM_FUNC void BlitPixieAllBitPartialMask(
register PixelPtr srcPixelP,
register PixelPtr dstPixelP,
register PixelPtr maskPixelP,
unsigned long rowsToCopy,
unsigned long numBytesPerRow,
register unsigned long srcRowStride,
register unsigned long dstRowStride,
register unsigned long srcExtraStart,
register unsigned long dstExtraStart,
register unsigned long dstExtraEnd);
///--------------------------------------------------------------------------------------
// Function prototypes for 8-bit blitters
///--------------------------------------------------------------------------------------
SW_FUNC void BlitPixie8BitRectDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect *srcRect,
Rect *dstRect);
SW_FUNC void BP8BitInterlacedRectDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect* srcRect,
Rect* dstRect);
SW_FUNC void BlitPixie8BitMaskDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect *srcRect,
Rect *dstRect);
SW_FUNC void BlitPixie8BitPartialMaskDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect *srcRect,
Rect *dstRect);
SW_FUNC void BP8BitInterlacedMaskDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect* srcRect,
Rect* dstRect);
SW_FUNC void BP8BitInterlacedPartialMaskDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect* srcRect,
Rect* dstRect);
SW_FUNC void CompiledSprite8BitDrawProc(
FramePtr srcFrameP,
FramePtr dstFrameP,
Rect *srcRect,
Rect *dstRect);
SW_FUNC unsigned char BlitPixie8BitGetPixel(
FramePtr srcFrameP,
Point thePoint );
SW_FUNC void BlitPixie8BitSetPixel(
FramePtr srcFrameP,
Point thePoint,
unsigned char theColor);
SW_FUNC void SWAnimate8BitStarField(
SpriteWorldPtr spriteWorldP,
StarArray *starArray,
short numStars,
short backColor);
SW_FUNC void SWBlitPixie8BitFlipSprite(
SpritePtr srcSpriteP );
void BlitPixie8Bit(
register PixelChunkPtr srcPixelP,
register PixelChunkPtr dstPixelP,
register unsigned long rowsToCopy,
register unsigned long numBytesPerRow,
register unsigned long srcRowStride,
register unsigned long dstRowStride);
void BlitPixieMask8Bit(
register PixelPtr srcPixelP,
register PixelPtr dstPixelP,
register PixelPtr maskPixelP,
register unsigned long rowsToCopy,
register unsigned long numBytesPerRow,
register unsigned long srcRowStride,
register unsigned long dstRowStride);
void BlitPixiePartialMask8Bit(
register PixelPtr srcPixelP,
register PixelPtr dstPixelP,
register PixelPtr maskPixelP,
register unsigned long rowsToCopy,
register unsigned long numBytesPerRow,
register unsigned long srcRowStride,
register unsigned long dstRowStride);
#ifdef __cplusplus
}
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#endif /* __BLITPIXIE__ */